
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ScrollViewItem : MonoBehaviour
{
    protected int dataIndex;
    protected LCScrollView scrollView;
    public virtual void Init(LCScrollView scrollView)
    {
        this.scrollView = scrollView;
    }
    public virtual void Refresh(int dataIndex, object data)
    {
        this.dataIndex = dataIndex;
    }
    public void ShowSelf()
    {
        gameObject.SetActive(true);
    }
    public void HideSelf()
    {
        gameObject.SetActive(false);
    }
    protected void OnClick()
    {
        scrollView.clickEvent?.Invoke(dataIndex);
    }
}
